<div class="col-md-12">
	<?php if(isset($message) && $message == 1) :?>
		<div class="alert alert-success" style="text-align:center; margin:10px auto;">
			<i class="fa fa-check-circle fa-4x"></i><br/>
			Deleting Post Success. <a href="<?php echo site_url('User/all_entries') ?>">Back to entries list</a>
		</div>
	<?php  elseif(isset($message) && $message == 0): ?>
		<div class="alert alert-danger" style="text-align:center; margin:10px auto;">
			<i class="fa fa-frown-o fa-4x"></i><br/>
			Deleting Post Failed
		</div>
	<?php else: ?>
		<div class="alert alert-danger" style="text-align:center; margin:10px auto;">
			<i class="fa fa-exclamation-triangle fa-4x"></i><br/>
			Are you really want to delete this post?
		</div>
	<?php endif; ?>

	<form action="<?php echo site_url("Post/delete_post/$post_data[id_post]") ?>" method="POST" <?php if(isset($visible))echo $visible ?>>
		<table class="table table-bordered table-striped">

			<tr>
				<th>Post Title</th>
				<th>Location</th>
				<th>Category</th>
				<th>Post Summary</th>
				<th>Post Date</th>
				<th>Post Thumbnail</th>
			</tr>
			<tr>
				<td><?php echo $post_data['post_title'] ?></td>
				<td><?php echo $post_data['location_name'] ?></td>
				<td><?php echo $post_data['category_name'] ?></td>
				<td><?php echo substr($post_data['post_content'], 0,100).".....	" ?></td>
				<td><?php echo $post_data['post_date'] ?></td>
				<td><img src="<?php echo base_url() ?>Images/Post_Thumb/<?php echo $post_data['thumbnail'] ?>" width="250px"/></td>
			</tr>
		</table>
		<div style="text-align:center;margin-bottom:25px;">
			<a href="<?php echo site_url('User/all_entries') ?>" class="btn btn-lg btn-info">Back to Post List</a>
			<button type="submit" name="btn_delete_post" value="delete post" class="btn btn-lg btn-danger">Delete Post</button>
		</div>
	</form>
</div>